package com.example.zytj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.zytj.model.ConsumeLog;

import org.apache.ibatis.annotations.Select;

public interface IConsumeLogMapper extends BaseMapper<ConsumeLog>{
    @Select("UPDATE consume_log SET out_time = SYSDATE() WHERE id = ( SELECT a.id FROM ( SELECT id FROM consume_log WHERE card_no = #{cardNo} ORDER BY in_time DESC LIMIT 1 ) a )")
    Integer swipingOut(String cardNo);
}
